import java.util.Scanner;

public class Main{
    
    public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int count = 0;
        if(num >= 1 && num <= 1000){
            for(int i = num; i >=5; i--){
                int tmp = i; //count记录0出现的次数
                //当该数模5余数为0时count++
                while(tmp%5 == 0){
                    count++;
                    tmp /= 5;
                }
            }
        }
        System.out.println(count);
    }
}